import { resolve, dirname } from "node:path";
import { fileURLToPath } from "node:url";

/**
 * @param {string} relativePath
 * @returns {string}
 */
function abs(relativePath) {
  return resolve(dirname(fileURLToPath(import.meta.url)), relativePath);
}

export const config = {
  internals: [
    /node\:/,
    /js-tiktoken/,
    /@langchain\/core/,
    /langsmith/,
    /@langchain\/community/,
    "axios", // axios is a dependency of openai
    "convex",
    "convex/server",
    "convex/values",
    "@rockset/client/dist/codegen/api.js",
    "mysql2/promise",
    "pdf-parse/lib/pdf.js/v1.10.100/build/pdf.js",
    "@zilliz/milvus2-sdk-node/dist/milvus/const/Milvus.js",
    "@zilliz/milvus2-sdk-node/dist/milvus/types.js",
    "notion-to-md/build/utils/notion.js",
    "firebase-admin/app",
    "firebase-admin/firestore",
    "web-auth-library/google",
    "@google-ai/generativelanguage/build/protos/protos.js",
  ],
  entrypoints: {
    load: "load/index",
    "load/serializable": "load/serializable",
    // agents
    agents: "agents/index",
    "agents/load": "agents/load",
    "agents/toolkits": "agents/toolkits/index",
    "agents/toolkits/aws_sfn": "agents/toolkits/aws_sfn",
    "agents/toolkits/connery": "agents/toolkits/connery/index",
    "agents/toolkits/sql": "agents/toolkits/sql/index",
    "agents/format_scratchpad": "agents/format_scratchpad/openai_functions",
    "agents/format_scratchpad/openai_tools":
      "agents/format_scratchpad/openai_tools",
    "agents/format_scratchpad/log": "agents/format_scratchpad/log",
    "agents/format_scratchpad/xml": "agents/format_scratchpad/xml",
    "agents/format_scratchpad/log_to_message":
      "agents/format_scratchpad/log_to_message",
    "agents/react/output_parser": "agents/react/output_parser",
    "agents/xml/output_parser": "agents/xml/output_parser",
    "agents/openai/output_parser": "agents/openai/output_parser",
    // base language
    base_language: "base_language/index",
    // tools
    tools: "tools/index",
    "tools/aws_lambda": "tools/aws_lambda",
    "tools/aws_sfn": "tools/aws_sfn",
    "tools/calculator": "tools/calculator",
    "tools/chain": "tools/chain",
    "tools/connery": "tools/connery",
    "tools/render": "tools/render",
    "tools/retriever": "tools/retriever",
    "tools/sql": "tools/sql",
    "tools/webbrowser": "tools/webbrowser",
    "tools/gmail": "tools/gmail/index",
    "tools/google_calendar": "tools/google_calendar/index",
    "tools/google_places": "tools/google_places",
    // chains
    chains: "chains/index",
    "chains/combine_documents": "chains/combine_documents/index",
    "chains/combine_documents/reduce": "chains/combine_documents/reduce",
    "chains/history_aware_retriever": "chains/history_aware_retriever",
    "chains/load": "chains/load",
    "chains/openai_functions": "chains/openai_functions/index",
    "chains/query_constructor": "chains/query_constructor/index",
    "chains/query_constructor/ir": "chains/query_constructor/ir",
    "chains/retrieval": "chains/retrieval",
    "chains/sql_db": "chains/sql_db/index",
    "chains/graph_qa/cypher": "chains/graph_qa/cypher",
    // embeddings
    "embeddings/base": "embeddings/base",
    "embeddings/bedrock": "embeddings/bedrock",
    "embeddings/cache_backed": "embeddings/cache_backed",
    "embeddings/cloudflare_workersai": "embeddings/cloudflare_workersai",
    "embeddings/fake": "embeddings/fake",
    "embeddings/ollama": "embeddings/ollama",
    "embeddings/openai": "embeddings/openai",
    "embeddings/cohere": "embeddings/cohere",
    "embeddings/tensorflow": "embeddings/tensorflow",
    "embeddings/hf": "embeddings/hf",
    "embeddings/hf_transformers": "embeddings/hf_transformers",
    "embeddings/googlevertexai": "embeddings/googlevertexai",
    "embeddings/googlepalm": "embeddings/googlepalm",
    "embeddings/minimax": "embeddings/minimax",
    "embeddings/voyage": "embeddings/voyage",
    "embeddings/llama_cpp": "embeddings/llama_cpp",
    "embeddings/gradient_ai": "embeddings/gradient_ai",
    // llms
    "llms/load": "llms/load",
    "llms/base": "llms/base",
    "llms/openai": "llms/openai",
    "llms/ai21": "llms/ai21",
    "llms/aleph_alpha": "llms/aleph_alpha",
    "llms/cloudflare_workersai": "llms/cloudflare_workersai",
    "llms/cohere": "llms/cohere",
    "llms/hf": "llms/hf",
    "llms/raycast": "llms/raycast",
    "llms/ollama": "llms/ollama",
    "llms/replicate": "llms/replicate",
    "llms/fireworks": "llms/fireworks",
    "llms/googlevertexai": "llms/googlevertexai/index",
    "llms/googlevertexai/web": "llms/googlevertexai/web",
    "llms/googlepalm": "llms/googlepalm",
    "llms/gradient_ai": "llms/gradient_ai",
    "llms/sagemaker_endpoint": "llms/sagemaker_endpoint",
    "llms/watsonx_ai": "llms/watsonx_ai",
    "llms/bedrock": "llms/bedrock/index",
    "llms/bedrock/web": "llms/bedrock/web",
    "llms/llama_cpp": "llms/llama_cpp",
    "llms/writer": "llms/writer",
    "llms/portkey": "llms/portkey",
    "llms/yandex": "llms/yandex",
    "llms/fake": "llms/fake",
    // prompts
    prompts: "prompts/index",
    "prompts/load": "prompts/load",
    // vectorstores
    "vectorstores/clickhouse": "vectorstores/clickhouse",
    "vectorstores/analyticdb": "vectorstores/analyticdb",
    "vectorstores/base": "vectorstores/base",
    "vectorstores/cassandra": "vectorstores/cassandra",
    "vectorstores/convex": "vectorstores/convex",
    "vectorstores/elasticsearch": "vectorstores/elasticsearch",
    "vectorstores/memory": "vectorstores/memory",
    "vectorstores/cloudflare_vectorize": "vectorstores/cloudflare_vectorize",
    "vectorstores/closevector/web": "vectorstores/closevector/web",
    "vectorstores/closevector/node": "vectorstores/closevector/node",
    "vectorstores/chroma": "vectorstores/chroma",
    "vectorstores/googlevertexai": "vectorstores/googlevertexai",
    "vectorstores/hnswlib": "vectorstores/hnswlib",
    "vectorstores/faiss": "vectorstores/faiss",
    "vectorstores/weaviate": "vectorstores/weaviate",
    "vectorstores/lancedb": "vectorstores/lancedb",
    "vectorstores/momento_vector_index": "vectorstores/momento_vector_index",
    "vectorstores/mongo": "vectorstores/mongo",
    "vectorstores/mongodb_atlas": "vectorstores/mongodb_atlas",
    "vectorstores/pinecone": "vectorstores/pinecone",
    "vectorstores/qdrant": "vectorstores/qdrant",
    "vectorstores/supabase": "vectorstores/supabase",
    "vectorstores/opensearch": "vectorstores/opensearch",
    "vectorstores/pgvector": "vectorstores/pgvector",
    "vectorstores/milvus": "vectorstores/milvus",
    "vectorstores/neo4j_vector": "vectorstores/neo4j_vector",
    "vectorstores/prisma": "vectorstores/prisma",
    "vectorstores/typeorm": "vectorstores/typeorm",
    "vectorstores/myscale": "vectorstores/myscale",
    "vectorstores/redis": "vectorstores/redis",
    "vectorstores/rockset": "vectorstores/rockset",
    "vectorstores/typesense": "vectorstores/typesense",
    "vectorstores/singlestore": "vectorstores/singlestore",
    "vectorstores/tigris": "vectorstores/tigris",
    "vectorstores/usearch": "vectorstores/usearch",
    "vectorstores/vectara": "vectorstores/vectara",
    "vectorstores/vercel_postgres": "vectorstores/vercel_postgres",
    "vectorstores/voy": "vectorstores/voy",
    "vectorstores/xata": "vectorstores/xata",
    "vectorstores/zep": "vectorstores/zep",
    // text_splitter
    text_splitter: "text_splitter",
    // memory
    memory: "memory/index",
    "memory/zep": "memory/zep",
    // document
    document: "document",
    // document_loaders
    "document_loaders/base": "document_loaders/base",
    "document_loaders/web/apify_dataset": "document_loaders/web/apify_dataset",
    "document_loaders/web/assemblyai": "document_loaders/web/assemblyai",
    "document_loaders/web/azure_blob_storage_container":
      "document_loaders/web/azure_blob_storage_container",
    "document_loaders/web/azure_blob_storage_file":
      "document_loaders/web/azure_blob_storage_file",
    "document_loaders/web/cheerio": "document_loaders/web/cheerio",
    "document_loaders/web/puppeteer": "document_loaders/web/puppeteer",
    "document_loaders/web/playwright": "document_loaders/web/playwright",
    "document_loaders/web/college_confidential":
      "document_loaders/web/college_confidential",
    "document_loaders/web/gitbook": "document_loaders/web/gitbook",
    "document_loaders/web/hn": "document_loaders/web/hn",
    "document_loaders/web/imsdb": "document_loaders/web/imsdb",
    "document_loaders/web/figma": "document_loaders/web/figma",
    "document_loaders/web/github": "document_loaders/web/github",
    "document_loaders/web/notiondb": "document_loaders/web/notiondb",
    "document_loaders/web/notionapi": "document_loaders/web/notionapi",
    "document_loaders/web/pdf": "document_loaders/web/pdf",
    "document_loaders/web/recursive_url": "document_loaders/web/recursive_url",
    "document_loaders/web/s3": "document_loaders/web/s3",
    "document_loaders/web/sitemap": "document_loaders/web/sitemap",
    "document_loaders/web/sonix_audio": "document_loaders/web/sonix_audio",
    "document_loaders/web/confluence": "document_loaders/web/confluence",
    "document_loaders/web/couchbase": "document_loaders/web/couchbase",
    "document_loaders/web/searchapi": "document_loaders/web/searchapi",
    "document_loaders/web/serpapi": "document_loaders/web/serpapi",
    "document_loaders/web/sort_xyz_blockchain":
      "document_loaders/web/sort_xyz_blockchain",
    "document_loaders/web/youtube": "document_loaders/web/youtube",
    "document_loaders/fs/directory": "document_loaders/fs/directory",
    "document_loaders/fs/buffer": "document_loaders/fs/buffer",
    "document_loaders/fs/chatgpt": "document_loaders/fs/chatgpt",
    "document_loaders/fs/text": "document_loaders/fs/text",
    "document_loaders/fs/json": "document_loaders/fs/json",
    "document_loaders/fs/srt": "document_loaders/fs/srt",
    "document_loaders/fs/pdf": "document_loaders/fs/pdf",
    "document_loaders/fs/docx": "document_loaders/fs/docx",
    "document_loaders/fs/epub": "document_loaders/fs/epub",
    "document_loaders/fs/csv": "document_loaders/fs/csv",
    "document_loaders/fs/notion": "document_loaders/fs/notion",
    "document_loaders/fs/obsidian": "document_loaders/fs/obsidian",
    "document_loaders/fs/unstructured": "document_loaders/fs/unstructured",
    "document_loaders/fs/openai_whisper_audio":
      "document_loaders/fs/openai_whisper_audio",
    "document_loaders/fs/pptx": "document_loaders/fs/pptx",
    // document_transformers
    "document_transformers/html_to_text": "document_transformers/html_to_text",
    "document_transformers/mozilla_readability":
      "document_transformers/mozilla_readability",
    "document_transformers/openai_functions":
      "document_transformers/openai_functions",
    // chat_models
    "chat_models/base": "chat_models/base",
    "chat_models/openai": "chat_models/openai",
    "chat_models/portkey": "chat_models/portkey",
    "chat_models/anthropic": "chat_models/anthropic",
    "chat_models/bedrock": "chat_models/bedrock/index",
    "chat_models/bedrock/web": "chat_models/bedrock/web",
    "chat_models/cloudflare_workersai": "chat_models/cloudflare_workersai",
    "chat_models/googlevertexai": "chat_models/googlevertexai/index",
    "chat_models/googlevertexai/web": "chat_models/googlevertexai/web",
    "chat_models/googlepalm": "chat_models/googlepalm",
    "chat_models/fireworks": "chat_models/fireworks",
    "chat_models/baiduwenxin": "chat_models/baiduwenxin",
    "chat_models/iflytek_xinghuo": "chat_models/iflytek_xinghuo/index",
    "chat_models/iflytek_xinghuo/web": "chat_models/iflytek_xinghuo/web",
    "chat_models/ollama": "chat_models/ollama",
    "chat_models/minimax": "chat_models/minimax",
    "chat_models/llama_cpp": "chat_models/llama_cpp",
    "chat_models/yandex": "chat_models/yandex",
    "chat_models/fake": "chat_models/fake",
    // schema
    schema: "schema/index",
    "schema/document": "schema/document",
    "schema/output_parser": "schema/output_parser",
    "schema/prompt_template": "schema/prompt_template",
    "schema/query_constructor": "schema/query_constructor",
    "schema/retriever": "schema/retriever",
    "schema/runnable": "schema/runnable/index",
    "schema/storage": "schema/storage",
    // sql_db
    sql_db: "sql_db",
    // callbacks
    callbacks: "callbacks/index",
    "callbacks/handlers/llmonitor": "callbacks/handlers/llmonitor",
    // output_parsers
    output_parsers: "output_parsers/index",
    "output_parsers/expression": "output_parsers/expression",
    // retrievers
    "retrievers/amazon_kendra": "retrievers/amazon_kendra",
    "retrievers/remote": "retrievers/remote/index",
    "retrievers/supabase": "retrievers/supabase",
    "retrievers/zep": "retrievers/zep",
    "retrievers/metal": "retrievers/metal",
    "retrievers/chaindesk": "retrievers/chaindesk",
    "retrievers/databerry": "retrievers/databerry",
    "retrievers/contextual_compression": "retrievers/contextual_compression",
    "retrievers/document_compressors": "retrievers/document_compressors/index",
    "retrievers/multi_query": "retrievers/multi_query",
    "retrievers/multi_vector": "retrievers/multi_vector",
    "retrievers/parent_document": "retrievers/parent_document",
    "retrievers/vectara_summary": "retrievers/vectara_summary",
    "retrievers/tavily_search_api": "retrievers/tavily_search_api",
    "retrievers/time_weighted": "retrievers/time_weighted",
    "retrievers/document_compressors/chain_extract":
      "retrievers/document_compressors/chain_extract",
    "retrievers/document_compressors/embeddings_filter":
      "retrievers/document_compressors/embeddings_filter",
    "retrievers/hyde": "retrievers/hyde",
    "retrievers/score_threshold": "retrievers/score_threshold",
    "retrievers/self_query": "retrievers/self_query/index",
    "retrievers/self_query/chroma": "retrievers/self_query/chroma",
    "retrievers/self_query/functional": "retrievers/self_query/functional",
    "retrievers/self_query/pinecone": "retrievers/self_query/pinecone",
    "retrievers/self_query/supabase": "retrievers/self_query/supabase",
    "retrievers/self_query/weaviate": "retrievers/self_query/weaviate",
    "retrievers/self_query/vectara": "retrievers/self_query/vectara",
    "retrievers/vespa": "retrievers/vespa",
    "retrievers/matryoshka_retriever": "retrievers/matryoshka_retriever",
    // cache
    cache: "cache/index",
    "cache/cloudflare_kv": "cache/cloudflare_kv",
    "cache/momento": "cache/momento",
    "cache/redis": "cache/redis",
    "cache/ioredis": "cache/ioredis",
    "cache/file_system": "cache/file_system",
    "cache/upstash_redis": "cache/upstash_redis",
    // stores
    "stores/doc/in_memory": "stores/doc/in_memory",
    "stores/doc/gcs": "stores/doc/gcs",
    "stores/file/in_memory": "stores/file/in_memory",
    "stores/file/node": "stores/file/node",
    "stores/message/cassandra": "stores/message/cassandra",
    "stores/message/convex": "stores/message/convex",
    "stores/message/cloudflare_d1": "stores/message/cloudflare_d1",
    "stores/message/in_memory": "stores/message/in_memory",
    "stores/message/dynamodb": "stores/message/dynamodb",
    "stores/message/firestore": "stores/message/firestore",
    "stores/message/momento": "stores/message/momento",
    "stores/message/mongodb": "stores/message/mongodb",
    "stores/message/redis": "stores/message/redis",
    "stores/message/ioredis": "stores/message/ioredis",
    "stores/message/upstash_redis": "stores/message/upstash_redis",
    "stores/message/planetscale": "stores/message/planetscale",
    "stores/message/xata": "stores/message/xata",
    // storage
    "storage/convex": "storage/convex",
    "storage/encoder_backed": "storage/encoder_backed",
    "storage/in_memory": "storage/in_memory",
    "storage/ioredis": "storage/ioredis",
    "storage/vercel_kv": "storage/vercel_kv",
    "storage/upstash_redis": "storage/upstash_redis",
    "storage/file_system": "storage/file_system",
    // graphs
    "graphs/neo4j_graph": "graphs/neo4j_graph",
    // hub
    hub: "hub",
    // utilities
    "util/convex": "util/convex",
    "util/document": "util/document",
    "util/math": "util/math",
    "util/time": "util/time",
    // experimental
    "experimental/autogpt": "experimental/autogpt/index",
    "experimental/openai_assistant": "experimental/openai_assistant/index",
    "experimental/openai_files": "experimental/openai_files/index",
    "experimental/babyagi": "experimental/babyagi/index",
    "experimental/generative_agents": "experimental/generative_agents/index",
    "experimental/plan_and_execute": "experimental/plan_and_execute/index",
    "experimental/multimodal_embeddings/googlevertexai":
      "experimental/multimodal_embeddings/googlevertexai",
    "experimental/chat_models/anthropic_functions":
      "experimental/chat_models/anthropic_functions",
    "experimental/chat_models/bittensor": "experimental/chat_models/bittensor",
    "experimental/chat_models/ollama_functions":
      "experimental/chat_models/ollama_functions",
    "experimental/llms/bittensor": "experimental/llms/bittensor",
    "experimental/hubs/makersuite/googlemakersuitehub":
      "experimental/hubs/makersuite/googlemakersuitehub",
    "experimental/chains/violation_of_expectations":
      "experimental/chains/violation_of_expectations/index",
    "experimental/masking": "experimental/masking/index",
    "experimental/prompts/custom_format": "experimental/prompts/custom_format",
    "experimental/prompts/handlebars": "experimental/prompts/handlebars",
    "experimental/tools/pyinterpreter": "experimental/tools/pyinterpreter",
    // evaluation
    evaluation: "evaluation/index",
    // smith (LangSmith Evaluation)
    smith: "smith/index",
    // runnables
    runnables: "runnables/index",
    "runnables/remote": "runnables/remote",
    // indexes
    indexes: "indexes/index",
  },
  deprecatedNodeOnly: [
    "embeddings",
    "llms",
    "chat_models",
    "vectorstores",
    "retrievers",
    "document_loaders",
  ],
  deprecatedOmitFromImportMap: [
    "agents/toolkits/connery",
    "base_language",
    "cache",
    "cache/cloudflare_kv",
    "cache/io_redis",
    "cache/momento",
    "cache/upstash_redis",
    "callbacks",
    "callbacks/handlers/llmonitor",
    "chat_models/baiduwenxin",
    "chat_models/base",
    "chat_models/bedrock",
    "chat_models/bedrock/web",
    "chat_models/cloudflare_workersai",
    "chat_models/fake",
    "chat_models/fireworks",
    "chat_models/googlepalm",
    "chat_models/googlevertexai",
    "chat_models/googlevertexai/web",
    "chat_models/iflytek_xinghuo",
    "chat_models/iflytek_xinghuo/web",
    "chat_models/llama_cpp",
    "chat_models/minimax",
    "chat_models/ollama",
    "chat_models/openai",
    "chat_models/portkey",
    "chat_models/yandex",
    "document",
    "document_transformers/html_to_text",
    "document_transformers/mozilla_readability",
    "embeddings/base",
    "embeddings/bedrock",
    "embeddings/cloudflare_workersai",
    "embeddings/cohere",
    "embeddings/googlepalm",
    "embeddings/googlevertexai",
    "embeddings/gradient_ai",
    "embeddings/hf",
    "embeddings/hf_transformers",
    "embeddings/llama_cpp",
    "embeddings/minimax",
    "embeddings/ollama",
    "embeddings/openai",
    "embeddings/tensorflow",
    "embeddings/voyage",
    "experimental/chat_models/ollama_functions",
    "graphs/neo4j_graph",
    "llms/ai21",
    "llms/aleph_alpha",
    "llms/base",
    "llms/bedrock",
    "llms/bedrock/web",
    "llms/cloudflare_workersai",
    "llms/cohere",
    "llms/fireworks",
    "llms/googlepalm",
    "llms/googlevertexai",
    "llms/googlevertexai/web",
    "llms/gradient_ai",
    "llms/hf",
    "llms/llama_cpp",
    "llms/ollama",
    "llms/openai",
    "llms/portkey",
    "llms/raycast",
    "llms/replicate",
    "llms/sagemaker_endpoint",
    "llms/watsonx_ai",
    "llms/writer",
    "llms/yandex",
    "load/serializable",
    "memory",
    "memory/chat_memory",
    "memory/motorhead_memory",
    "memory/zep",
    "prompts",
    "retrievers/amazon_kendra",
    "retrievers/chaindesk",
    "retrievers/databerry",
    "retrievers/metal",
    "retrievers/supabase",
    "retrievers/tavily_search_api",
    "retrievers/vectara_summary",
    "retrievers/zep",
    "runnables",
    "schema",
    "schema/document",
    "schema/output_parser",
    "schema/retriever",
    "schema/runnable",
    "schema/storage",
    "storage/convex",
    "storage/ioredis",
    "storage/upstash_redis",
    "storage/vercel_kv",
    "stores/message/cassandra",
    "stores/message/cloudflare_d1",
    "stores/message/convex",
    "stores/message/dynamodb",
    "stores/message/firestore",
    "stores/message/ioredis",
    "stores/message/momento",
    "stores/message/mongodb",
    "stores/message/planetscale",
    "stores/message/redis",
    "stores/message/upstash_redis",
    "stores/message/xata",
    "tools",
    "tools/aiplugin",
    "tools/aws_lambda",
    "tools/aws_sfn",
    "tools/bingserpapi",
    "tools/brave_search",
    "tools/connery",
    "tools/dadjokeapi",
    "tools/dataforseo_api_search",
    "tools/gmail",
    "tools/google_custom_search",
    "tools/google_places",
    "tools/ifttt",
    "tools/searchapi",
    "tools/searxng_search",
    "tools/serpapi",
    "tools/serper",
    "tools/wikipedia_query_run",
    "tools/wolframalpha",
    "util/convex",
    "vectorstores/analyticdb",
    "vectorstores/base",
    "vectorstores/cassandra",
    "vectorstores/chroma",
    "vectorstores/clickhouse",
    "vectorstores/closevector/node",
    "vectorstores/closevector/web",
    "vectorstores/cloudflare_vectorize",
    "vectorstores/convex",
    "vectorstores/elasticsearch",
    "vectorstores/faiss",
    "vectorstores/googlevertexai",
    "vectorstores/hnswlib",
    "vectorstores/lancedb",
    "vectorstores/milvus",
    "vectorstores/momento_vector_index",
    "vectorstores/mongodb_atlas",
    "vectorstores/myscale",
    "vectorstores/neo4j_vector",
    "vectorstores/opensearch",
    "vectorstores/pgvector",
    "vectorstores/pinecone",
    "vectorstores/prisma",
    "vectorstores/qdrant",
    "vectorstores/redis",
    "vectorstores/rockset",
    "vectorstores/singlestore",
    "vectorstores/supabase",
    "vectorstores/tigris",
    "vectorstores/typeorm",
    "vectorstores/typesense",
    "vectorstores/usearch",
    "vectorstores/vectara",
    "vectorstores/vercel_postgres",
    "vectorstores/voy",
    "vectorstores/weaviate",
    "vectorstores/xata",
    "vectorstores/zep",
  ],
  requiresOptionalDependency: [
    "agents/load",
    "agents/toolkits/aws_sfn",
    "agents/toolkits/sql",
    "tools/aws_lambda",
    "tools/aws_sfn",
    "tools/calculator",
    "tools/sql",
    "tools/webbrowser",
    "tools/google_calendar",
    "tools/gmail",
    "callbacks/handlers/llmonitor",
    "chains/load",
    "chains/sql_db",
    "chains/graph_qa/cypher",
    "embeddings/bedrock",
    "embeddings/cloudflare_workersai",
    "embeddings/cohere",
    "embeddings/googlevertexai",
    "embeddings/googlepalm",
    "embeddings/tensorflow",
    "embeddings/hf",
    "embeddings/hf_transformers",
    "embeddings/llama_cpp",
    "embeddings/gradient_ai",
    "llms/load",
    "llms/cohere",
    "llms/googlevertexai",
    "llms/googlevertexai/web",
    "llms/googlepalm",
    "llms/gradient_ai",
    "llms/hf",
    "llms/raycast",
    "llms/replicate",
    "llms/sagemaker_endpoint",
    "llms/watsonx_ai",
    "llms/bedrock",
    "llms/bedrock/web",
    "llms/llama_cpp",
    "llms/writer",
    "llms/portkey",
    "prompts/load",
    "vectorstores/analyticdb",
    "vectorstores/cassandra",
    "vectorstores/clickhouse",
    "vectorstores/chroma",
    "vectorstores/cloudflare_vectorize",
    "vectorstores/closevector/web",
    "vectorstores/closevector/node",
    "vectorstores/convex",
    "vectorstores/googlevertexai",
    "vectorstores/elasticsearch",
    "vectorstores/hnswlib",
    "vectorstores/faiss",
    "vectorstores/weaviate",
    "vectorstores/lancedb",
    "vectorstores/mongo",
    "vectorstores/momento_vector_index",
    "vectorstores/mongodb_atlas",
    "vectorstores/pinecone",
    "vectorstores/qdrant",
    "vectorstores/supabase",
    "vectorstores/opensearch",
    "vectorstores/pgvector",
    "vectorstores/typeorm",
    "vectorstores/milvus",
    "vectorstores/myscale",
    "vectorstores/neo4j_vector",
    "vectorstores/redis",
    "vectorstores/rockset",
    "vectorstores/singlestore",
    "vectorstores/typesense",
    "vectorstores/tigris",
    "vectorstores/usearch",
    "vectorstores/vercel_postgres",
    "vectorstores/voy",
    "vectorstores/zep",
    "memory/zep",
    "document_loaders/web/apify_dataset",
    "document_loaders/web/assemblyai",
    "document_loaders/web/azure_blob_storage_container",
    "document_loaders/web/azure_blob_storage_file",
    "document_loaders/web/cheerio",
    "document_loaders/web/puppeteer",
    "document_loaders/web/playwright",
    "document_loaders/web/college_confidential",
    "document_loaders/web/gitbook",
    "document_loaders/web/hn",
    "document_loaders/web/imsdb",
    "document_loaders/web/figma",
    "document_loaders/web/github",
    "document_loaders/web/pdf",
    "document_loaders/web/notiondb",
    "document_loaders/web/notionapi",
    "document_loaders/web/recursive_url",
    "document_loaders/web/s3",
    "document_loaders/web/sitemap",
    "document_loaders/web/sonix_audio",
    "document_loaders/web/confluence",
    "document_loaders/web/couchbase",
    "document_loaders/web/youtube",
    "document_loaders/fs/directory",
    "document_loaders/fs/buffer",
    "document_loaders/fs/chatgpt",
    "document_loaders/fs/text",
    "document_loaders/fs/json",
    "document_loaders/fs/srt",
    "document_loaders/fs/pdf",
    "document_loaders/fs/docx",
    "document_loaders/fs/epub",
    "document_loaders/fs/csv",
    "document_loaders/fs/notion",
    "document_loaders/fs/obsidian",
    "document_loaders/fs/unstructured",
    "document_loaders/fs/openai_whisper_audio",
    "document_loaders/fs/pptx",
    "document_transformers/html_to_text",
    "document_transformers/mozilla_readability",
    "chat_models/bedrock",
    "chat_models/bedrock/web",
    "chat_models/googlevertexai",
    "chat_models/googlevertexai/web",
    "chat_models/googlepalm",
    "chat_models/llama_cpp",
    "chat_models/portkey",
    "chat_models/iflytek_xinghuo",
    "chat_models/iflytek_xinghuo/web",
    "sql_db",
    "retrievers/amazon_kendra",
    "retrievers/supabase",
    "retrievers/zep",
    "retrievers/metal",
    "retrievers/vectara_summary",
    "retrievers/self_query",
    "retrievers/self_query/chroma",
    "retrievers/self_query/functional",
    "retrievers/self_query/pinecone",
    "retrievers/self_query/supabase",
    "retrievers/self_query/weaviate",
    "retrievers/self_query/vectara",
    "output_parsers/expression",
    "chains/query_constructor",
    "chains/query_constructor/ir",
    "cache/cloudflare_kv",
    "cache/momento",
    "cache/redis",
    "cache/ioredis",
    "cache/file_system",
    "cache/upstash_redis",
    "stores/doc/gcs",
    "stores/file/node",
    "stores/message/cloudflare_d1",
    "stores/message/cassandra",
    "stores/message/convex",
    "stores/message/dynamodb",
    "stores/message/firestore",
    "stores/message/momento",
    "stores/message/mongodb",
    "stores/message/redis",
    "stores/message/ioredis",
    "stores/message/upstash_redis",
    "stores/message/planetscale",
    "stores/message/xata",
    "storage/convex",
    "storage/file_system",
    "storage/ioredis",
    "storage/vercel_kv",
    "storage/upstash_redis",
    "graphs/neo4j_graph",
    // Prevent export due to circular dependency with "load" entrypoint
    "hub",
    "experimental/multimodal_embeddings/googlevertexai",
    "experimental/chat_models/anthropic_functions",
    "experimental/llms/bittensor",
    "experimental/hubs/makersuite/googlemakersuitehub",
    "experimental/prompts/handlebars",
    "experimental/tools/pyinterpreter",
    "util/convex",
  ],
  extraImportMapEntries: [
    {
      modules: ["ChatOpenAI"],
      alias: ["chat_models", "openai"],
      path: "@langchain/openai",
    },
    {
      modules: ["OpenAI"],
      alias: ["llms", "openai"],
      path: "@langchain/openai",
    },
    {
      modules: ["OpenAIEmbeddings"],
      alias: ["embeddings", "openai"],
      path: "@langchain/openai",
    },
    {
      modules: ["PromptTemplate"],
      alias: ["prompts", "prompt"],
      path: "@langchain/core/prompts",
    },
    {
      modules: [
        "AIMessage",
        "AIMessageChunk",
        "BaseMessage",
        "BaseMessageChunk",
        "ChatMessage",
        "ChatMessageChunk",
        "FunctionMessage",
        "FunctionMessageChunk",
        "HumanMessage",
        "HumanMessageChunk",
        "SystemMessage",
        "SystemMessageChunk",
        "ToolMessage",
        "ToolMessageChunk",
      ],
      alias: ["schema", "messages"],
      path: "@langchain/core/messages",
    },
    {
      modules: [
        "AIMessage",
        "AIMessageChunk",
        "BaseMessage",
        "BaseMessageChunk",
        "ChatMessage",
        "ChatMessageChunk",
        "FunctionMessage",
        "FunctionMessageChunk",
        "HumanMessage",
        "HumanMessageChunk",
        "SystemMessage",
        "SystemMessageChunk",
        "ToolMessage",
        "ToolMessageChunk",
      ],
      alias: ["schema"],
      path: "@langchain/core/messages",
    },
    {
      modules: [
        "AIMessagePromptTemplate",
        "ChatMessagePromptTemplate",
        "ChatPromptTemplate",
        "HumanMessagePromptTemplate",
        "MessagesPlaceholder",
        "SystemMessagePromptTemplate",
      ],
      alias: ["prompts", "chat"],
      path: "@langchain/core/prompts",
    },
    {
      modules: [
        "ImagePromptTemplate",
      ],
      alias: ["prompts", "image"],
      path: "@langchain/core/prompts",
    },
    {
      modules: ["PipelinePromptTemplate"],
      alias: ["prompts", "pipeline"],
      path: "@langchain/core/prompts",
    },
    {
      modules: ["StringPromptValue"],
      alias: ["prompts", "base"],
      path: "@langchain/core/prompt_values",
    },
    {
      modules: [
        "RouterRunnable",
        "RunnableAssign",
        "RunnableBinding",
        "RunnableBranch",
        "RunnableEach",
        "RunnableMap",
        "RunnableParallel",
        "RunnablePassthrough",
        "RunnablePick",
        "RunnableRetry",
        "RunnableSequence",
        "RunnableWithFallbacks",
        "RunnableWithMessageHistory",
      ],
      alias: ["schema", "runnable"],
      path: "@langchain/core/runnables",
    },
    {
      modules: ["StringOutputParser"],
      alias: ["schema", "output_parser"],
      path: "@langchain/core/output_parsers",
    },
    {
      modules: ["ChatGenerationChunk", "GenerationChunk"],
      alias: ["schema", "output"],
      path: "@langchain/core/outputs",
    },
    {
      modules: ["ChatFireworks"],
      alias: ["chat_models", "fireworks"],
      path: "@langchain/community/chat_models/fireworks",
    },
    {
      modules: ["Fireworks"],
      alias: ["llms", "fireworks"],
      path: "@langchain/community/llms/fireworks",
    },
  ],
  shouldTestExports: true,
  tsConfigPath: resolve("./tsconfig.json"),
  cjsSource: "./dist-cjs",
  cjsDestination: "./dist",
  abs,
};
